var endX;
    $("#main").on('touchstart', '.carts-item', function (e) {
        var touch = e.originalEvent.targetTouches[0];
        startX = touch.pageX;
        console.log(startX)
    })
    $("#main").on('touchmove', '.carts-item', function (e) {

        var touch = e.originalEvent.targetTouches[0];
        endX = (startX - touch.pageX);
        if (endX > 0 && endX <= 200) {
            $(this).css("left", -endX / 100 + 'rem')
        } else if (endX < 0) {
            $(this).css("left", 0 + 'rem')
        }
    })
    $("#main").on('touchend', '.carts-item', function (e) {
        $(".carts-item").css("left", 0 + 'rem')
        console.log(endX)
        if (endX >= 100) {
            $(this).css("left", '-1.5rem')
        }
    })

    function deleteList(that) {
        $(that).parent(".list").remove();  
        var historyData=JSON.parse(storage.getItem("historyData"));
        var id=$(that).attr("list_id")
        //console.log(historyData)
        for(var i=0;i<historyData.data.length;i++){
        	if(id==historyData.data[i].id){
        		historyData.data.splice(i,1)
        		console.log(historyData)
        		storage.setItem("historyData",JSON.stringify(historyData));	
        		return;
        	}
        }
    }


$("#hearder").on("click","img",function(){
	history.go(-1)
})